def tprint(objectlist: list):
    """
    表格的形式打印 dict 列表
    """
    if not objectlist:
        return

    if not type(objectlist) is list:
        objectlist = [objectlist]
    
    if not type(objectlist[0]) is dict:
        return

    header = {}
    line_div = ' | '
    sepa_div = '-+-'

    for key in objectlist[0].keys():
        header[key] = len(key)
    
    line = line_div.join(str(k).ljust(header[k]) for k in header.keys())
    separator = sepa_div.join('-' * header[k] for k in header.keys())
    print(separator)
    print(line)
    print(separator)

    for i, obj in enumerate(objectlist):
        line = line_div.join(str(obj[k]).ljust(header[k]) for k in header.keys())
        print(line)

    print(separator)
